package org.lib.data.user.api.feign;

import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import lombok.extern.slf4j.Slf4j;

/**
 * UserFeignFallbackFactory
 * 获取异常信息
 * @author ben
 * @date 2021-09-03 16:03:04 CST
 */
@Component
@Slf4j
public class UserFeignFallbackFactory implements FallbackFactory<UserFeignFallback> {

	@Override
	public UserFeignFallback create(Throwable cause) {
		log.error("UserFeign调用异常：cause={}", cause);
		return new UserFeignFallback();
	}

}
